﻿namespace CiStatus.CiStatusAddIn.Logic.Status
{
    public abstract class Status : IStatus
    {
        public override bool Equals(object obj)
        {
            var x = obj as IStatus;
            return x != null && Equals(x);
        }

        public bool Equals(IStatus other)
        {
            if (other!=null)
            {
                return other.GetType().Equals(GetType()) && Details.Message.Equals(other.Details.Message);
            }
            return false;
        }

        public override int GetHashCode()
        {
            return GetType().GetHashCode() ^ Details.Message.GetHashCode();
        }

        public StatusDetails Details { get; set; }
    }
}
